package com.example.administrator.biyesheji_print.Utils;

import android.util.Log;
import android.view.View;

import com.youth.banner.transformer.ABaseTransformer;

/**
 * Created by Administrator on 2018/3/29.
 */

public class CubeAnim extends ABaseTransformer {
    @Override
    protected void onTransform(View view, float position) {
        view.setPivotX(position < 0f ? view.getWidth() : 0f);//设置旋转点
        view.setPivotY(view.getHeight() * 0.5f);//设置y轴旋转点
        view.setRotationY(45f * position);//竖直旋转度数
    }
    @Override
    public boolean isPagingEnabled() {
        return true;
    }
}
